var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "react", "components/common/component"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    const React = require("react");
    const component_1 = require("components/common/component");
    const defaultEmptyText = '请设置 HTML';
    let HTML = class HTML extends React.Component {
        render() {
            let { html } = this.props;
            if (!html) {
                let emptyText = this.props.emptyText || defaultEmptyText;
                html = `<div class="text-center" style="padding:20px 0 20px 0">${emptyText}</div>`;
            }
            return React.createElement("div", { dangerouslySetInnerHTML: { __html: html } });
        }
    };
    HTML = __decorate([
        component_1.component({ displayName: "HTML", icon: "icon-text-width", introduce: "用于创建 HTML 文本" })
    ], HTML);
    exports.HTML = HTML;
});
